import express from 'express';
import socketIo from 'socket.io';
import http from 'http';
class socket {
    httpServer: http.Server;
    socketServer: socketIo.Server;
    constructor(server: http.Server) {
        this.httpServer = server;
        this.socketServer = socketIo.listen(server)
    }

    connect() {
        this.socketServer.on('connection', socket => {
            console.log('连接成功');
        })
    }
}

export default socket;